//
//  UserInfoResModel.swift
//  koolcar
//
//  Created by kuaimaxiansheng on 2023/10/30.
//

import UIKit
import ObjectMapper
class UserInfoResModel:  Mappable {
    var code : String?
    var data : UserInfoDataModel?
    var msg : String?
    
    func mapping(map: Map) {
        code <- map["code"]
        data <- map["data"]
        msg <- map["msg"]
        
    }
    required init?(map: Map){}
}


class UserInfoDataModel: Mappable {
    var account : String?
    var completeOrders : Int?
    var createdTime : String?
    var delFlag : Int?
    var firstName : String?
    var gender: NSInteger?
    var id : Int?
    var lastLoginDate : String?
    var lastName : String?
    var modifyTime : String?
    var password : String?
    var phone : String?
    var status : Int?
    var type : Int?
    var userName : String?
    var email : String?
    var birthday : String?
    var version : Int?
    var agreeFlag: Int?
    var orderFlag: Int?
    var readFlag: Int?//0-无 1-有
    var integralValue: Double?
    var levelValue: NSInteger?
    var memberLevelVO: MemberModel?
    var referralCode: String?//推荐码
    var referralCodeStr: String?
    var salutation: Int?
    func mapping(map: Map) {
        levelValue <- map["levelValue"]
        gender <- map["gender"]
        salutation <- map["salutation"]
        integralValue <- map["integralValue"]
        agreeFlag <- map["agreeFlag"]
        birthday <- map["birthday"]
        email <- map["email"]
        account <- map["account"]
        completeOrders <- map["completeOrders"]
        createdTime <- map["createdTime"]
        delFlag <- map["delFlag"]
        firstName <- map["firstName"]
        id <- map["id"]
        lastLoginDate <- map["lastLoginDate"]
        lastName <- map["lastName"]
        modifyTime <- map["modifyTime"]
        password <- map["password"]
        phone <- map["phone"]
        status <- map["status"]
        type <- map["type"]
        userName <- map["userName"]
        version <- map["version"]
        orderFlag <- map["orderFlag"]
        readFlag <- map["readFlag"]
        memberLevelVO <- map["memberLevelVO"]
        referralCode <- map["referralCode"]
        referralCodeStr <- map["referralCodeStr"]
    }
    
    required init?(map: Map){}
}

class MemberModel: Mappable {
    var id : Int?
    var levelName : String?
    var levelNameEn : String?
    var levelNameSc : String?
    var price : Double?
    var productDiscount : Double?//商品折扣率
    var productStr: String?//商品折扣率：繁体和简体的时候用
    var productFlag : Int?//商品折扣是否启用: 0-否 1-是
    var serverFlag : Int?//服务折扣是否启用: 0-否 1-是
    var serverDiscount: Double?//服务折扣率
    var serverStr: String?//服务折扣率：繁体和简体的时候用
    var urlPicture: String?
    
    var account : String?
    var avatar : String?
    var email : String?
    var firstName : String?
    var gender : NSInteger?
    var lastName : String?
    var mobileAreaCode : NSInteger?
    var phone : String?
    var point : String?
    var registIntegral : String?
    var status : NSInteger?
    
    
    func mapping(map: Map) {
        id <- map["id"]
        levelName <- map["levelName"]
        price <- map["price"]
        productDiscount <- map["productDiscount"]
        productFlag <- map["productFlag"]
        serverFlag <- map["serverFlag"]
        serverDiscount <- map["serverDiscount"]
        urlPicture <- map["urlPicture"]
        levelNameEn <- map["levelNameEn"]
        levelNameSc <- map["levelNameSc"]
        productStr <- map["productStr"]
        serverStr <- map["serverStr"]
        
        account <- map["account"]
        avatar <- map["avatar"]
        email <- map["email"]
        firstName <- map["firstName"]
        avatar <- map["avatar"]
        gender <- map["gender"]
        lastName <- map["lastName"]
        mobileAreaCode <- map["mobileAreaCode"]
        phone <- map["phone"]
        point <- map["point"]
        registIntegral <- map["registIntegral"]
        status <- map["status"]
    }
    required init?(map: Map){}
}
